home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
prcmfixs.arc
/
PRCMHOST.ARC
/
PRCMHOST.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1987-06-08
|
2KB
|
83 lines
;
; This is a primitive example of automating a file transfer with
; a machine running ProComm's host. It is not robust and it makes
; many assumptions, but it works fairly reliably if your modem uses
; a Hayes compatible command set and you have ProComm setup right.
;
; You must customize this section
;
DIAL "1" ;* Dialing directory entry number
ASSIGN S0 "*.WRK" ;* File specs for up/down-loading
ASSIGN S1 "hostname" ;* Name to send to host
ASSIGN S2 "hostpswd" ;* Host password
ASSIGN S3 "shllpswd" ;* Shell password (for remote Host shutdown)
EMULATE ANSI ;* Use ANSI-BBS emulation
START:
TRANSMIT "!" ;* Transmit several Carriage returns waiting
WAITFOR "Name:" 7 ;* .. for first prompt
IF NOT WAITFOR
GOTO START
ENDIF
TRANSMIT S1 ;* Send name
TRANSMIT "!"
WAITFOR "word:"
TRANSMIT S2 ;* Send host password
TRANSMIT "!"
WAITFOR "choice?"
MESSAGE " "
MESSAGE " "
MESSAGE "You must identify an operation by modifying the .CMD file"
MESSAGE " "
;GOSUB KERMDOWN ; Make your
;GOSUB KERMUP ; choice
;
; Include final processing here. Transmit a ^Z^M to make the host
; return to Terminal mode or command file, a G^M to simply terminate
; the call. It is setup by default here to make both sides exit ProComm.
;
BYE:
PAUSE 1
TRANSMIT "!"
WAITFOR "choice?"
IF NOT WAITFOR
GOTO BYE
ENDIF
TRANSMIT "^Z^M" ;* Shut the host down
WAITFOR "word:"
TRANSMIT S3
PAUSE 5
QUIT
KERMDOWN:
;
; Subroutine example of an automated Kermit download
;
TRANSMIT "D!" ;* D for download
WAITFOR "choice?"
TRANSMIT "K!" ;* K for Kermit
WAITFOR "spec?"
TRANSMIT S0 ;* Tell the host which file(s)
TRANSMIT "^M"
WAITFOR "dure."
GETFILE KERMIT
RETURN
KERMUP:
;
; Subroutine example of an automated Kermit upload
;
TRANSMIT "U!" ;* U for upload
WAITFOR "choice?"
TRANSMIT "K!" ;* K for Kermit
WAITFOR "dure."
SENDFILE KERMIT S0
RETURN